<template>
    <div>
 <h1>个人中心</h1>

 <div>
      <el-avatar :src="cover" >
    
    </el-avatar>
    </div>

    </div>
   
</template>
<script>
export default {
 name:'PersonalPage',
 data(){
    return{
cover:''
    }
 },
 methods:{
    getcover(){
       var userid= sessionStorage.getItem('userId')
       var data=new FormData()
       data.append('userId',userid)
       this.$axios.post('/getcover',data).then(resp=>{
        if(resp.status==200){
            console.log(resp.data);
           this.cover= resp.data
        }
       })
    }

 }
 ,mounted:function(){
    this.getcover()
 }
}
</script>
<style scoped>

</style>